package cn.lili.controller.feign.order;

import cn.lili.modules.order.aftersale.entity.dos.AfterSale;
import cn.lili.modules.order.aftersale.service.AfterSaleStatisticsService;
import cn.lili.modules.order.order.client.AfterSaleStatisticsClient;
import cn.lili.modules.statistics.entity.dto.StatisticsQueryParam;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author paulG
 * @since 2022/6/23
 **/
@RestController
@RequiredArgsConstructor
public class AfterSaleStatisticsFeignController implements AfterSaleStatisticsClient {

    private final AfterSaleStatisticsService afterSaleStatisticsService;

    @Override
    public Long applyNum(String serviceType, String storeId) {
        return afterSaleStatisticsService.applyNum(serviceType, storeId);
    }

    @Override
    public Page<AfterSale> getStatistics(StatisticsQueryParam statisticsQueryParam) {
        return afterSaleStatisticsService.getStatistics(statisticsQueryParam);
    }

    @Override
    public Long applyNumByUrban(String serviceType, String storeId) {
        return afterSaleStatisticsService.applyNumByUrban(serviceType, storeId);
    }
}
